package d1113.r212.num27;

public class ZooApp {
    public static void main(String[] args) {
        Feeder feeder=new Feeder("小熊狗");
        Cat cat=new Cat("猫咪涵涵");
        Dog dog=new Dog("金毛鑫鑫");
        Food food=new Food("小鱼干");
        Food food1=new Food("肉骨头");
        feeder.feed(cat,food);
        feeder.feed(dog,food1);
        feeder.feed(new Animal() {  //匿名内部类
            @Override
            public void shout() {
                System.out.println("嗷嗷嗷");
            }
        },food1);
        feeder.feed(cat,new Food("猫草"));//匿名对象


    }

}
